<template>
  <div>
    <!--通过v-bind动态绑定标签属性-->
    <a v-bind:href="state.href" v-bind:target="state.target">百度一下</a>
  </div>
</template>
<script>
import { reactive} from 'vue'
export default{
  setup(){
    const state = reactive({
      href:'https://www.baidu.com',
      target:'_blank'
    })
    return {state}
  }
}
</script>